package com.maybach.common.templates;

import com.maybach.common.VO.LetterInfoVO;
import lombok.Data;

/**
 * Created by songshuang on 16/3/7.
 */
@Data
public class LetterInfoTemplate {

    // 模板内容所填写信息
    private LetterInfoVO letterInfoVO;

    // 模板title
    private String title;

    private String template;

    public LetterInfoTemplate(LetterInfoVO letterInfoVO) {

        this.letterInfoVO = letterInfoVO;

        this.template = "\n" +
                "<!DOCTYPE html>\n" +
                "<html>\n" +
                "<head>\n" +
                "  <meta charset=\"utf-8\"/>\n" +
                "  <style>\n" +
                "body{ \n"+
                "   font-family: SimSun; \n"+
                "}\n"+
                ".delegate-letter {\n" +
                "    width: 726px;\n" +
                "    background-color: #fff;\n" +
                "    margin: 0 auto;\n" +
                "    font-size: 16px;\n" +
                "}\n" +
                ".delegate-letter h1 {\n" +
                "    text-align: center;\n" +
                "    line-height: 100px;\n" +
                "    font-size: 32px;\n" +
                "    font-weight: normal;\n" +
                "}\n" +
                ".delegate-letter .title2 {\n" +
                "    text-align: left;\n" +
                "    text-decoration: underline;\n" +
                "    font-size: 24px;\n" +
                "}\n" +
                ".delegate-letter p {\n" +
                "    line-height: 40px;\n" +
                "}\n" +
                ".delegate-letter .underline-text {\n" +
                "    border-bottom: 1px solid #333;\n" +
                "    width: 200px;\n" +
                "    display: inline-block;\n" +
                "}\n" +
                ".delegate-letter .blank-text {\n" +
                "    width: 50px;\n" +
                "    display: inline-block;\n" +
                "}\n" +
                ".clearfix:after {\n" +
                "    visibility: hidden;\n" +
                "    display: block;\n" +
                "    font-size: 0;\n" +
                "    content: \" \";\n" +
                "    clear: both;\n" +
                "    height: 0;\n" +
                "}\n" +
                ".clearfix {\n" +
                "    zoom: 1; /* for IE6 IE7 */\n" +
                "}\n" +
                "  </style>\n" +
                "</head>\n" +
                "<body>\n" +
                "  <div class=\"delegate-letter\">\n" +
                "      <h1>提车委托函</h1>\n" +
                "      <div class=\"clearfix\">\n" +
                "          <p class=\"title2\">杭州一骑轻尘信息技术有限公司：</p>\n" +
                "          <p style=\"text-indent: 40px;margin-top: 30px;\">兹授权（提车人姓名）<span class=\"underline-text\">"+letterInfoVO.getUserName()+"</span>，手机号码：<span class=\"underline-text\">"+letterInfoVO.getMobile()+"</span>，身份证号码：<span\n" +
                "                  class=\"underline-text\">"+letterInfoVO.getIdentityId()+"</span>\n" +
                "              ，到贵公司全权办理本单位的\n" +
                "              <br/>\n" +
                "              车型<span class=\"underline-text\">"+letterInfoVO.getModelName()+"</span> 车架号为 <span class=\"underline-text\">"+letterInfoVO.getCarUnique()+"</span>\n" +
                "               的提车事宜，请贵公司给予办理。\n" +
                "              <br/>\n" +
                "              特此委托。</p>\n" +
                "          <p style=\"text-align: right\">（委托人）签名：<span class=\"underline-text\"></span> 公司</p>\n" +
                "          <p style=\"text-align: right;margin: 20px 0 0 0\">(委托人是单位时，盖公章)</p>\n" +
                "          <p style=\"float: right\">日期：<span class=\"blank-text\"></span>年<span class=\"blank-text\"></span>月<span class=\"blank-text\"></span>日</p>\n" +
                "      </div>\n" +
                "  </div>\n" +
                "  <div class=\"delegate-letter\">\n" +
                "      <h1>车辆交接确认</h1>\n" +
                "      <div class=\"clearfix\">\n" +
                "          <p>车型：<span class=\"underline-text\">"+letterInfoVO.getModelName()+"</span> 车架号为（17位）：<span class=\"underline-text\">"+letterInfoVO.getCarUnique()+"</span> ，\n" +
                "              <br />\n" +
                "              已确认接收，随车附件及车况无误。</p>\n" +
                "          <div style=\"float: right;margin-top: 40px\">\n" +
                "              <p>车辆接收公司（盖章）：<span class=\"blank-text\"></span></p>\n" +
                "              <p>接车人：<span class=\"blank-text\"></span></p>\n" +
                "              <p>日期：<span class=\"blank-text\"></span>年<span class=\"blank-text\"></span>月<span class=\"blank-text\"></span>日</p>\n" +
                "          </div>\n" +
                "      </div>\n" +
                "  </div>\n" +
                "</body>\n" +
                "</html>\n";
    }

}
